package com.shxc.smarttrade.community.fragment;

import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import com.just.library.AgentWeb;
import com.just.library.WebDefaultSettingsManager;
import com.shxc.smarttrade.R;
import com.shxc.smarttrade.base.BaseFragment;

import org.xchris.view.annotation.ContentView;
import org.xchris.view.annotation.ViewInject;

/**
 * 社区 - 常见问题
 */
@ContentView(R.layout.fragment_android_question)
public class AndroidQuestionFragment extends BaseFragment {
    @ViewInject(R.id.linearlayout)
    LinearLayout linearlayout;

    private AgentWeb mAgentWeb;
    private String url;
    @Override
    public void onViewCreated(View view, Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);

        url = "file:///android_asset/html/common_question.html";

        mAgentWeb = AgentWeb.with(this)//
                .setAgentWebParent((ViewGroup) view, new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT))//
                .setIndicatorColorWithHeight(-1, 2)//
                .setWebSettings(WebDefaultSettingsManager.getInstance())
                .setSecurityType(AgentWeb.SecurityType.strict)
                .createAgentWeb()//
                .ready()//
                .go(url);
    }
}
